<!DOCTYPE html>
<html lang="zh" dir="ltr">
<head>
  <meta charset="utf-8">
  <title>文件预览中...</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
</head>
<body>
</body>
<script>
    (function (){
      const checkFile =function(name){
        var nsz = name.split(".");
        var ext = nsz[nsz.length - 1];
        var ali = "pdf,wps,wpt,doc,docx,docm,dot,dotx,dotm,rtf,txt,et,xls,xlsx,xlsm,xlt,xltx,xltm,csv,ppt,pptx,pptm,ppsx,ppsm,pps,potx,potm,dpt,dps".split(",");
        if(ali.includes(ext.toLowerCase())){
          return "wps.html";
        }
        return;
      }
      var path = decodeURIComponent( '<?php echo @$_GET["path"];?>');
      var name = decodeURIComponent('<?php echo @$_GET["name"];?>');
      let page = checkFile(name);
      if(!page || page != "wps.html"){
        Tips.tips("当前文件不支持","error");
        return;
      }
      page = "<?php echo $this->pluginHost;?>"+"static/"+page+"?path="+encodeURIComponent(path)+"&name="+encodeURIComponent(name);
      window.location.href = page;
    })()
</script>
</html>
